package cn.bx.bid.ctrl;

import cn.bx.bid.config.Printer;
import cn.bx.bid.util.LogUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ParamController {

    @Autowired
    private RedisConfig config;

    @Autowired
    @Qualifier("p2")
    private Printer printr;

    @RequestMapping("showPrinter")
    public String showPrinter(){
        LogUtil.info("打印机如下:"+printr);
        return "printer";
    }

    @RequestMapping("showconfig")
    public String index(){
        LogUtil.info(config+">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        return "hello";
    }
}
